$('#flash-content').empty();
$('.modalBox-flash').empty();
<%- if flash[:alert] %>
  request_processed = false;
  $('.modalBox-flash').append('<div class="alert"><%= escape_javascript(flash[:alert]) %></div>');
  $('.modalBox-flash').fadeIn('slow');
<%- else %>
  request_processed = true;
  <%- if flash[:notice] %>
    $('#flash-content').append('<div class="notice"><%= escape_javascript(flash[:notice]) %></div>');
    $('#flash').fadeIn('slow');
  <%- end %>
<%- end %>